combobox: always give the full allocation to the button in menu mode
authorCosimo Cecchi <cosimoc@gnome.org>
Tue, 12 Apr 2011 18:20:27 +0000 (14:20 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Tue, 12 Apr 2011 21:14:36 +0000 (17:14 -0400)
The button is what draws the background/frame outline of the combobox,
and padding is defined as the spacing *inside* the widget between the
border and the content.

https://bugzilla.gnome.org/show_bug.cgi?id=646882

gtk/gtkcombobox.c

index 3caa1d74cd49293631bf37ede355daeb165bbf54..98d3e0c356377b7533101efbae2ccab5922a6600 100644 (file)
@@ -2418,14 +2418,14 @@ gtk_combo_box_size_allocate (GtkWidget     *widget,
           gint width;
           guint border_width;
 
+          gtk_widget_size_allocate (priv->button, allocation);
+
           /* menu mode */
           allocation->x += padding.left;
           allocation->y += padding.top;
           allocation->width -= padding.left + padding.right;
           allocation->height -= padding.top + padding.bottom;
 
-          gtk_widget_size_allocate (priv->button, allocation);
-
           /* set some things ready */
           border_width = gtk_container_get_border_width (GTK_CONTAINER (priv->button));
           get_widget_padding (priv->button, &button_padding);